package org.jeecg.modules.scm.api.factory;

import feign.hystrix.FallbackFactory;
import org.jeecg.modules.scm.api.ScmInvItemRsApi;
import org.jeecg.modules.scm.api.fallback.ScmInvItemRsFallback;
import org.springframework.stereotype.Component;

/**
 * @Author: zzq
 */
@Component
public class ScmInvItemRsApiFallbackFactory implements FallbackFactory<ScmInvItemRsApi> {
    @Override
    public ScmInvItemRsApi create(Throwable throwable) {
        ScmInvItemRsFallback scmInvItemRsFallback = new ScmInvItemRsFallback();
        scmInvItemRsFallback.setCause(throwable);
        return scmInvItemRsFallback;
    }
}
